﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="/Scripts/jquery-1.8.2.min.js"></script>
    <script>
        ///测试
        function test() {
            $.ajax({
                url: "/API/test/test",
                dataType: "json",
                data: {
                    val: { "status": 1, "msg": "成功", "info": "" },
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }               
        ///合作机构列表
        function GetClublist() {
            $.ajax({
                url: "/API/Shop/GetClublist",
                dataType: "json",
                data: {
                    uid: "56ba94e9-013c-40d2-937d-ea185460fafd",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        } 
        ///获取对应ID的波波俱乐部信息
        function GetClubClassByid() {
            $.ajax({
                url: "/API/Shop/GetClubClassByid",
                dataType: "json",
                data: {
                    uid: "56ba94e9-013c-40d2-937d-ea185460fafd",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }                 
        ///获取对应ID的波波俱乐部信息
        function GetClubInnfoByid() {
            $.ajax({
                url: "/API/Shop/GetClubInnfoByid",
                dataType: "json",
                data: {
                    uid: "56ba94e9-013c-40d2-937d-ea185460fafd",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        } 
        ///获取对应ID的波波俱乐部发型师
        function GetClubHair() {
            $.ajax({
                url: "/API/Shop/GetClubHair",
                dataType: "json",
                data: {
                    uid: "5d9886d7-86dd-4a5f-ada5-65c3b172a51d",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }
        ///获取商城列表
        function GetShopClass() {
            $.ajax({
                url: "/API/Shop/GetShopClass",
                dataType: "json",
                data: {
                    pageindex: "1",
                    pagesize: "10",
                    //cuid: "db813257-6efa-47d0-a7d1-acaeb9851501",
                    cuid: "-1",
                    city: "-1",
                    month: "-1",
                    type: "-1",
                    oederby: "-1",
                    uid: "-1",
                    id: "-1",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///商品关键字搜索
        function SearchShopClass() {
            $.ajax({
                url: "/API/Shop/SearchShopClass",
                dataType: "json",
                data: {
                    word: "波波俱乐部",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///获取课程详情
        function GetShopClassdetital() {
            $.ajax({
                url: "/API/Shop/GetShopClassdetital",
                dataType: "json",
                data: {
                    id: "1010",
                    uid: 'ff3298fd-e9ce-4e05-b43c-fbf2e0221f4f'
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///获取商城筛选条件
        function GetShoptype() {
            $.ajax({
                url: "/API/Shop/GetShoptype",
                dataType: "json",
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }
             

        ///获取商城筛选条件
        function GetClubList() {
            $.ajax({
                url: "/API/Shop/GetClubList",
                dataType: "json",
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }
        ///订单列表
        function GetOrder() {
            $.ajax({
                url: "/API/Shop/GetOrder",
                dataType: "json",
                data: {
                    uid: "fff93307-9ecf-4405-a66e-8389b0c6f4d1",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///下单
        function AddOrder() {
            $.ajax({
                url: "/API/Shop/AddOrder",
                dataType: "json",
                data: {
                    uid: "fff93307-9ecf-4405-a66e-8389b0c6f4d1",
                    shcid: "13",
                    classdate: "2015-12-31",
                    num: 1,
                    paytype: 1,
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///获取最后一次下单的信息
        function GetOrderAddress() {
            $.ajax({
                url: "/API/Shop/GetOrderAddress",
                dataType: "json",
                data: {
                    uid: "fff93307-9ecf-4405-a66e-8389b0c6f4d1",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///订单详情
        function GetOrderinfo() {
            $.ajax({
                url: "/API/Shop/GetOrderinfo",
                dataType: "json",
                data: {
                    id: "2015121618525990",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///取消订单
        function COrder() {
            $.ajax({
                url: "/API/Shop/COrder",
                dataType: "json",
                data: {
                    id: "2015121618525990",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///评论列表
        function GetShopComment() {
            $.ajax({
                url: "/API/Shop/GetShopComment",
                dataType: "json",
                data: {
                    id: "942",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///添加评论
        function AddShopComment() {
            $.ajax({
                url: "/API/Shop/AddShopComment",
                dataType: "json",
                data: {
                    shcid: "942",
                    uid: "ff3298fd-e9ce-4e05-b43c-fbf2e0221f4f",
                    content: "测试评论",
                    reid: 91,
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///获取商城滑动广告
        function GetBanner1() {
            $.ajax({
                url: "/API/Shop/GetBanner1",
                dataType: "json",
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///获取首页推荐课程
        function GetBanner2() {
            $.ajax({
                url: "/API/Shop/GetBanner2",
                dataType: "json",
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///获取用户信息
        function GetUserInfo() {
            $.ajax({
                url: "/API/Shop/GetUserInfo",
                dataType: "json",
                data: {
                    uid: "fff93307-9ecf-4405-a66e-8389b0c6f4d1",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///获取用户信息
        function GetShopDefult() {
            $.ajax({
                url: "/API/Shop/GetShopDefult",
                dataType: "json",
                data: {
                    id: "fff93307-9ecf-4405-a66e-8389b0c6f4d1",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///获取波波俱乐部
        function GetClub() {
            $.ajax({
                url: "/API/Shop/GetClub",
                dataType: "json",
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///俱乐部下单
        function AddClubOrder() {
            $.ajax({
                url: "/API/Shop/AddClubOrder",
                dataType: "json",
                data: {
                    uid: "fff93307-9ecf-4405-a66e-8389b0c6f4d1",
                    shcid: "949",
                    name: "name",
                    tel: "tel",
                    classdate: "2015-12-24 17:35:25",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }

        ///评测打分
        function GetTest() {
            $.ajax({
                url: "/API/Shop/GetTest",
                dataType: "json",
                data: {
                    uid: "fff93307-9ecf-4405-a66e-8389b0c6f4d1",
                    answer: "0;2;1;3;4;1;2;4;3;0;1;1;1;2;4;",
                    name: "name",
                    position: "position",
                    age: "18",
                    sex: "1",
                },
                type: "post",
                success: function (result) {
                    //alert(result);
                    $("#h").html(JSON.stringify(result));
                },
                error: function () {
                    //alert(result.msg);
                    $("#h").html(result.msg);
                }
            });
        }
    </script> 
    <script src="/assets/js/cropper.min.js"></script>
    <script src="/assets/js/upload.js"></script>  
    <link href="/assets/css/cropper.min.css" rel="stylesheet" />
    <link href="/assets/css/upload.css" rel="stylesheet" />
</head>
<body>
    <h1 id="h"></h1>
    <input type="button" onclick="test()" title="测试" value="test" />
    <input type="button" onclick="GetShopClass()" title="获取商城列表" value="GetShopClass" />
    <input type="button" onclick="GetShoptype()" title="获取商城筛选条件" value="GetShoptype" />
    <input type="button" onclick="GetOrder()" title="订单列表" value="GetOrder" />
    <input type="button" onclick="AddOrder()" title="下单" value="AddOrder" />
    <input type="button" onclick="GetOrderinfo()" title="订单详情" value="GetOrderinfo" />
    <input type="button" onclick="SearchShopClass()" title="商品关键字搜索" value="SearchShopClass" />
    <input type="button" onclick="GetShopClassdetital()" title="获取课程详情" value="GetShopClassdetital" />
    <input type="button" onclick="GetShopComment()" title="评论列表" value="GetShopComment" />
    <input type="button" onclick="AddShopComment()" title="添加评论" value="AddShopComment" />
    <input type="button" onclick="GetBanner1()" title="获取商城滑动广告" value="GetBanner1" />
    <input type="button" onclick="GetBanner2()" title="获取首页推荐课程" value="GetBanner2" />
    <input type="button" onclick="GetOrderAddress()" title="获取最后一次下单的信息" value="GetOrderAddress" />
    <input type="button" onclick="GetUserInfo()" title="获取用户信息" value="GetUserInfo" />
    <input type="button" onclick="GetShopDefult()" title="获取首页发型" value="GetShopDefult" />
    <input type="button" onclick="COrder()" title="取消订单" value="COrder" />
    <input type="button" onclick="AddClubOrder()" title="俱乐部下单" value="AddClubOrder" />
    <input type="button" onclick="GetClub()" title="获取波波俱乐部" value="GetClub" />
    <input type="button" onclick="GetTest()" title="评测打分" value="GetTest" />      
    <input type="button" onclick="GetClubInnfoByid()" title="评测打分" value="GetClubInnfoByid" />
                                                                                         
    <input type="button" onclick="GetClubList()" title="获取波波俱乐部列表" value="GetClubList" />     
    <input type="button" onclick="GetClubHair()" title="评测打分" value="GetClubHair" />         
    <input type="button" onclick="GetClubClassByid()" title="评测打分" value="GetClubClassByid" /> 
    <input type="button" onclick="GetClublist()" title="合作机构列表 " value="GetClublist" />
	
		<video src="http://pili-live-hdl.ps.qiniucdn.com/NIU7PS/bobotest.flv"></video>
    <div class="am-form-group am-form-file">
        <label for="doc-ipt-file-2">标题图片(最多上传1张)</label>
        <p>
            @*
            <button type="button" onclick="showimage(this,'titleimage')" class="am-btn am-btn-default">添加标题图片</button>*@
        </p>
        <table class="temp">
            <tr>
            </tr>
        </table>


        <div style="width: 800px; height: 0px;" id="titleimage">
            <div class="img-container">
                <img src="/Content/Images/151116152941107.png" />
            </div>
            <div class="img-operation-btns" data-index="1">
                <label class="am-btn am-btn-primary am-radius" for="inputImage" title="Upload image file">
                    <input type="file" class="sr-only inputImage" id="inputImage" name="file" accept="image/*">
                    <span class="docs-tooltip" data-toggle="tooltip" title="Import image with Blob URLs">上传图片
                    </span>
                </label>
                <button type="button" class="am-btn am-btn-primary am-radius" data-method="getCroppedCanvas" data-type="title_image">
                    <span class="docs-tooltip" data-toggle="tooltip" title="$().cropper(&quot;getCroppedCanvas&quot;)">保存图片
                    </span>
                </button>
                <a href="javascript:;;" onclick="unsave(this)" class="am-btn am-btn-primary am-radius">取消保存
                </a>
                <input type="hidden" class="imgurl" name="SHC_IMAGE" placeholder="上传标题图片">
            </div>
        </div>
    </div>
</body>
</html>
